<?php
namespace app\qingadmin\controller;

use app\BaseController;
use think\facade\Db;
use app\common\model\User;
use think\facade\View;

class Config extends Base
{
    public function index(){
        $configData1=Db::name('config')->where('config_type',1)->select();
        $configData2=Db::name('config')->where('config_type',2)->select();
        return view('',[
            'configData1'=>$configData1,
            'configData2'=>$configData2
        ]);
    }
    public function del_cache(){
        //$path = runtime_path();//应用运行时止录runtime/qingadmin
        $path = root_path().'runtime';//runtime
        delFileByDir($path);
        return alert('清空缓存成功','/qingadmin/index/welcome',6);
    }
}